<%@ page import="com.greyfit.security.GreyFitUser" %>



<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'username', 'error')} required">
	<label for="username">
		<g:message code="greyFitUser.username.label" default="Username" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="username" required="" value="${greyFitUserInstance?.username}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'password', 'error')} required">
	<label for="password">
		<g:message code="greyFitUser.password.label" default="Password" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="password" required="" value="${greyFitUserInstance?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'accountExpired', 'error')} ">
	<label for="accountExpired">
		<g:message code="greyFitUser.accountExpired.label" default="Account Expired" />
		
	</label>
	<g:checkBox name="accountExpired" value="${greyFitUserInstance?.accountExpired}" />
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'accountLocked', 'error')} ">
	<label for="accountLocked">
		<g:message code="greyFitUser.accountLocked.label" default="Account Locked" />
		
	</label>
	<g:checkBox name="accountLocked" value="${greyFitUserInstance?.accountLocked}" />
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'enabled', 'error')} ">
	<label for="enabled">
		<g:message code="greyFitUser.enabled.label" default="Enabled" />
		
	</label>
	<g:checkBox name="enabled" value="${greyFitUserInstance?.enabled}" />
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'firstName', 'error')} ">
	<label for="firstName">
		<g:message code="greyFitUser.firstName.label" default="First Name" />
		
	</label>
	<g:textField name="firstName" value="${greyFitUserInstance?.firstName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'lastName', 'error')} ">
	<label for="lastName">
		<g:message code="greyFitUser.lastName.label" default="Last Name" />
		
	</label>
	<g:textField name="lastName" value="${greyFitUserInstance?.lastName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'passwordExpired', 'error')} ">
	<label for="passwordExpired">
		<g:message code="greyFitUser.passwordExpired.label" default="Password Expired" />
		
	</label>
	<g:checkBox name="passwordExpired" value="${greyFitUserInstance?.passwordExpired}" />
</div>

<div class="fieldcontain ${hasErrors(bean: greyFitUserInstance, field: 'userPrograms', 'error')} ">
	<label for="userPrograms">
		<g:message code="greyFitUser.userPrograms.label" default="User Programs" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${greyFitUserInstance?.userPrograms?}" var="u">
    <li><g:link controller="userProgram" action="show" id="${u.id}">${u?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="userProgram" action="create" params="['greyFitUser.id': greyFitUserInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'userProgram.label', default: 'UserProgram')])}</g:link>
</li>
</ul>

</div>

